﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

/// <summary>
/// Summary description for GetPatronInformation
/// </summary>
public class GetPatronInformation
{
    DatabaseAccess da = new DatabaseAccess();

    //call database access class to find out if card number
    //and password exist in database
    public int GetPatronLogin(int cardNum, string password) 
    {
        return da.getPatronLogin(cardNum, password);
    }

    //call database access class to get patron information
    public Patron getPatronInfo(int personID)
    {
        return da.getPatronInfo(personID);
    }

    //call database access class to get person information
    public Person getPersonInfo(int personID)
    {

        return da.getPersonInfo(personID);
    }

    //call database access class to get books checked out
    //by patron
    public SqlDataAdapter getCheckedOutBooks(int personID)
    {
        return da.getBooksCheckedOut(personID);
    }
}
